﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Truron.Purchase.Model.RemoteModel;
using Truron.Purchase.Utility;

namespace Truron.Purchase.Model
{
    [Serializable]
    [PrimaryKey("Id")]
    [Table("Purchase_OuterNoteApproval")]
    public class Purchase_OuterNoteApproval:BaseData
    {
        public int StepNo { get; set; }
        public int NoteId { get; set; }
        public int Approver { get; set; }
        public string ApproverName { get; set; }
        public int Action { get; set; }
        public string Comment { get; set; }
        public int Sort { get; set; }
        public int IsFinish { get; set; }
        [NotMapped]
        public string UserName { get; set; }
        public void Create(UserCache userInfo)
        {
            this.CreateUser = userInfo.UserId;
            this.CreateTime = DateTime.Now;
        }
        public void Modify(UserCache userInfo)
        {
            this.LastUpdateUser = userInfo.UserId;
            this.LastUpdateTime = DateTime.Now;
        }
    }
}
